<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>订单详情页</title>
</head>
<body>
	<table border=“1” align="center">
		<thead>
			<tr>
				<th>订单编号</th>
				<th>用户编号</th>
				<th>商品编号</th>
				<th>购买时间</th>
				<th>商品单价</th>
				<th>购买数量</th>
				<th>总金额</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${orderList}" var="vo">
				<tr>
					<td>${vo.did}</td>
					<td>${vo.cid}</td>
					<td>${vo.gid}</td>
					<td>${vo.buy_date}</td>
					<td>${vo.gprice}</td>
					<td>${vo.good_num}</td>
					<td>
					<!-- 通过el表达式实现数据计算 -->
						<p>${vo.gprice * vo.good_num}</p>
						
					</td>
				</tr>
				
			</c:forEach>
			<th colspan="9">
						<div align="center">
						<p>总金额为：</p>${sum_cost}
						</div>
				</th>
		</tbody>
	</table>
	
	
</body>
</html>